package cn.u313.repository;

import cn.u313.entry.JiLuEntry;
import cn.u313.entry.UserLingQuEntry;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface UserLingQuEntryRepository extends JpaRepository<UserLingQuEntry, Integer>, JpaSpecificationExecutor<UserLingQuEntry> {
    @Query(nativeQuery = true,value = "SELECT * FROM `t_lingQu` where qq =:qq and state=1")
    List<UserLingQuEntry> byQQ(String qq);

    @Query(nativeQuery = true,value = "SELECT * FROM `t_lingQu` where id =:id and state=1")
    UserLingQuEntry byId(String id);
}